home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / What's New? / Development Kits / Display Manager SDK v1.1 / Compiler & Runtime Files / • New universal header files • / PInterfaces / Video.p < prev   
Encoding:
Text File  |  1996-03-05  |  27.2 KB  |  672 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Video.p
  3.  
  4.      Contains:    Video Driver Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces in “Display Manager Development Kit” (post ETO #18)
  8.                  Date:        3/5/96
  9.  
  10.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  11.                  All rights reserved.
  12.  
  13.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  14.                  stack.  Include the file and version information (from above)
  15.                  in the problem description and send to:
  16.                      Internet:    apple.bugs@applelink.apple.com
  17.                      AppleLink:    APPLE.BUGS
  18.  
  19. }
  20.  
  21. {$IFC UNDEFINED UsingIncludes}
  22. {$SETC UsingIncludes := 0}
  23. {$ENDC}
  24.  
  25. {$IFC NOT UsingIncludes}
  26.  UNIT Video;
  27.  INTERFACE
  28. {$ENDC}
  29.  
  30. {$IFC UNDEFINED __VIDEO__}
  31. {$SETC __VIDEO__ := 1}
  32.  
  33. {$I+}
  34. {$SETC VideoIncludes := UsingIncludes}
  35. {$SETC UsingIncludes := 1}
  36.  
  37.  
  38. {$IFC UNDEFINED __QUICKDRAW__}
  39. {$I Quickdraw.p}
  40. {$ENDC}
  41. {    Types.p                                                        }
  42. {        ConditionalMacros.p                                        }
  43. {    MixedMode.p                                                    }
  44. {    QuickdrawText.p                                                }
  45.  
  46. {$PUSH}
  47. {$ALIGN MAC68K}
  48. {$LibExport+}
  49.  
  50. CONST
  51.     mBaseOffset                    = 1;                            {Id of mBaseOffset.}
  52.     mRowBytes                    = 2;                            {Video sResource parameter Id's }
  53.     mBounds                        = 3;                            {Video sResource parameter Id's }
  54.     mVersion                    = 4;                            {Video sResource parameter Id's }
  55.     mHRes                        = 5;                            {Video sResource parameter Id's }
  56.     mVRes                        = 6;                            {Video sResource parameter Id's }
  57.     mPixelType                    = 7;                            {Video sResource parameter Id's }
  58.     mPixelSize                    = 8;                            {Video sResource parameter Id's }
  59.     mCmpCount                    = 9;                            {Video sResource parameter Id's }
  60.     mCmpSize                    = 10;                            {Video sResource parameter Id's }
  61.     mPlaneBytes                    = 11;                            {Video sResource parameter Id's }
  62.     mVertRefRate                = 14;                            {Video sResource parameter Id's }
  63.     mVidParams                    = 1;                            {Video parameter block id.}
  64.     mTable                        = 2;                            {Offset to the table.}
  65.     mPageCnt                    = 3;                            {Number of pages}
  66.     mDevType                    = 4;                            {Device Type}
  67.     oneBitMode                    = 128;                            {Id of OneBitMode Parameter list.}
  68.     twoBitMode                    = 129;                            {Id of TwoBitMode Parameter list.}
  69.     fourBitMode                    = 130;                            {Id of FourBitMode Parameter list.}
  70.     eightBitMode                = 131;                            {Id of EightBitMode Parameter list.}
  71.  
  72.     sixteenBitMode                = 132;                            {Id of SixteenBitMode Parameter list.}
  73.     thirtyTwoBitMode            = 133;                            {Id of ThirtyTwoBitMode Parameter list.}
  74.     firstVidMode                = 128;                            {The new, better way to do the above. }
  75.     secondVidMode                = 129;                            { QuickDraw only supports six video }
  76.     thirdVidMode                = 130;                            { at this time.      }
  77.     fourthVidMode                = 131;
  78.     fifthVidMode                = 132;
  79.     sixthVidMode                = 133;
  80.     spGammaDir                    = 64;
  81.     spVidNamesDir                = 65;
  82.  
  83. { csTimingFormat values in VDTimingInfo }
  84. { look in the declaration rom for timing info }
  85.     kDeclROMtables                = 'decl';
  86.  
  87. { Timing mode constants for Display Manager MultiMode support
  88.     Corresponding    .h equates are in Video.h
  89.                     .a equates are in Video.a
  90.                     .r equates are in DepVideoEqu.r
  91.     
  92.     The first enum is the old names (for compatibility).
  93.     The second enum is the new names.
  94. }
  95.     timingApple12                = 130;                            {  512x384 (60 Hz) Rubik timing.}
  96.     timingApple12x                = 135;                            {  560x384 (60 Hz) Rubik-560 timing.}
  97.     timingApple13                = 140;                            {  640x480 (67 Hz) HR timing.}
  98.     timingApple13x                = 145;                            {  640x400 (67 Hz) HR-400 timing.}
  99.     timingAppleVGA                = 150;                            {  640x480  (60 Hz) VGA timing.}
  100.     timingApple15                = 160;                            {  640x870 (75 Hz) FPD timing.}
  101.     timingApple15x                = 165;                            {  640x818 (75 Hz) FPD-818 timing.}
  102.     timingApple16                = 170;                            {  832x624 (75 Hz) GoldFish timing.}
  103.     timingAppleSVGA                = 180;                            {  800x600  (56 Hz) SVGA timing.}
  104.     timingApple1Ka                = 190;                            { 1024x768 (60 Hz) VESA 1K-60Hz timing.}
  105.     timingApple1Kb                = 200;                            { 1024x768 (70 Hz) VESA 1K-70Hz timing.}
  106.     timingApple19                = 210;                            { 1024x768  (75 Hz) Apple 19" RGB.}
  107.     timingApple21                = 220;                            { 1152x870  (75 Hz) Apple 21" RGB.}
  108.  
  109.     timingInvalid                = 0;                            { Unknown timing… force user to confirm.}
  110.     timingApple_512x384_60hz    = 130;                            {  512x384  (60 Hz) Rubik timing.}
  111.     timingApple_560x384_60hz    = 135;                            {  560x384  (60 Hz) Rubik-560 timing.}
  112.     timingApple_640x480_67hz    = 140;                            {  640x480  (67 Hz) HR timing.}
  113.     timingApple_640x400_67hz    = 145;                            {  640x400  (67 Hz) HR-400 timing.}
  114.     timingVESA_640x480_60hz        = 150;                            {  640x480  (60 Hz) VGA timing.}
  115.     timingApple_640x870_75hz    = 160;                            {  640x870  (75 Hz) FPD timing.}
  116.     timingApple_640x818_75hz    = 165;                            {  640x818  (75 Hz) FPD-818 timing.}
  117.     timingApple_832x624_75hz    = 170;                            {  832x624  (75 Hz) GoldFish timing.}
  118.     timingVESA_800x600_56hz        = 180;                            {  800x600  (56 Hz) SVGA timing.}
  119.     timingVESA_800x600_60hz        = 182;                            {  800x600  (60 Hz) SVGA timing.}
  120.     timingVESA_800x600_72hz        = 184;                            {  800x600  (72 Hz) SVGA timing.}
  121.     timingVESA_800x600_75hz        = 186;                            {  800x600  (75 Hz) SVGA timing.}
  122.     timingVESA_1024x768_60hz    = 190;                            { 1024x768  (60 Hz) VESA 1K-60Hz timing.}
  123.     timingVESA_1024x768_70hz    = 200;                            { 1024x768  (70 Hz) VESA 1K-70Hz timing.}
  124.     timingVESA_1024x768_75hz    = 204;                            { 1024x768  (75 Hz) VESA 1K-70Hz timing (very similar to timingApple_1024x768_75hz).}
  125.     timingApple_1024x768_75hz    = 210;                            { 1024x768  (75 Hz) Apple 19" RGB.}
  126.     timingApple_1152x870_75hz    = 220;                            { 1152x870  (75 Hz) Apple 21" RGB.}
  127.     timingAppleNTSC_ST            = 230;                            {  512x384  (60 Hz, interlaced, non-convolved).}
  128.     timingAppleNTSC_FF            = 232;                            {  640x480  (60 Hz, interlaced, non-convolved).}
  129.     timingAppleNTSC_STconv        = 234;                            {  512x384  (60 Hz, interlaced, convolved).}
  130.     timingAppleNTSC_FFconv        = 236;                            {  640x480  (60 Hz, interlaced, convolved).}
  131.     timingApplePAL_ST            = 238;                            {  640x480  (50 Hz, interlaced, non-convolved).}
  132.     timingApplePAL_FF            = 240;                            {  768x576  (50 Hz, interlaced, non-convolved).}
  133.     timingApplePAL_STconv        = 242;                            {  640x480  (50 Hz, interlaced, convolved).}
  134.     timingApplePAL_FFconv        = 244;                            {  768x576  (50 Hz, interlaced, convolved).}
  135.     timingVESA_1280x960_75hz    = 250;                            { 1280x960  (75 Hz)}
  136.     timingVESA_1280x1024_60hz    = 260;                            { 1280x1024 (60 Hz)}
  137.     timingVESA_1280x1024_75hz    = 262;                            { 1280x1024 (75 Hz)}
  138.     timingVESA_1600x1200_60hz    = 280;                            { 1600x1200 (60 Hz) VESA proposed timing.}
  139.     timingVESA_1600x1200_65hz    = 282;                            { 1600x1200 (65 Hz) VESA proposed timing.}
  140.     timingVESA_1600x1200_70hz    = 284;                            { 1600x1200 (70 Hz) VESA proposed timing.}
  141.     timingVESA_1600x1200_75hz    = 286;                            { 1600x1200 (75 Hz) VESA proposed timing.}
  142.     timingVESA_1600x1200_80hz    = 288;                            { 1600x1200 (80 Hz) VESA proposed timing (pixel clock is 216 Mhz dot clock).}
  143.     timingSMPTE240M_60hz        = 400;                            { 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035.}
  144.     timingFilmRate_48hz            = 410;                            { 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480.}
  145.  
  146. { csConnectFlags values in VDDisplayConnectInfo }
  147.     kAllModesValid                = 0;                            { All modes not trimmed by primary init are good close enough to try }
  148.     kAllModesSafe                = 1;                            { All modes not trimmed by primary init are know to be safe }
  149.     kReportsTagging                = 2;                            { Can detect tagged displays (to identify smart monitors) }
  150.     kHasDirectConnection        = 3;                            { True implies that driver can talk directly to device (e.g. serial data link via sense lines) }
  151.     kIsMonoDev                    = 4;                            { Says whether there’s an RGB (0) or Monochrome (1) connection. }
  152.     kUncertainConnection        = 5;                            { There may not be a display (no sense lines?). }
  153.     kTaggingInfoNonStandard        = 6;                            { Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). }
  154.     kReportsDDCConnection        = 7;                            { Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). }
  155.     kHasDDCConnection            = 8;                            { Card has ddc connect now. }
  156.  
  157. { csDisplayType values in VDDisplayConnectInfo }
  158.     kUnknownConnect                = 1;                            { Not sure how we’ll use this, but seems like a good idea. }
  159.     kPanelConnect                = 2;                            { For use with fixed-in-place LCD panels. }
  160.     kPanelTFTConnect            = 2;                            { Alias for kPanelConnect }
  161.     kFixedModeCRTConnect        = 3;                            {  For use with fixed-mode (i.e., very limited range) displays. }
  162.     kMultiModeCRT1Connect        = 4;                            { 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe }
  163.     kMultiModeCRT2Connect        = 5;                            { 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe }
  164.     kMultiModeCRT3Connect        = 6;                            { 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain }
  165.     kMultiModeCRT4Connect        = 7;                            { Expansion to large multi mode (not yet used) }
  166.     kModelessConnect            = 8;                            { Expansion to modeless model (not yet used) }
  167.     kFullPageConnect            = 9;                            { 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) }
  168.     kVGAConnect                    = 10;                            { 640x480 VGA default -- question everything else }
  169.     kNTSCConnect                = 11;                            { NTSC ST (default), FF, STconv, FFconv }
  170.     kPALConnect                    = 12;                            { PAL ST (default), FF, STconv, FFconv }
  171.     kHRConnect                    = 13;                            { Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) }
  172.     kPanelFSTNConnect            = 14;                            { For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels }
  173.     kMonoTwoPageConnect            = 15;                            { 1152x870 Apple color two-page display }
  174.     kColorTwoPageConnect        = 16;                            { 1152x870 Apple B&W two-page display }
  175.     kColor16Connect                = 17;                            { 832x624 Apple B&W two-page display }
  176.     kColor19Connect                = 18;                            { 1024x768 Apple B&W two-page display }
  177.  
  178. { csTimingFlags values in VDTimingInfoRec }
  179.     kModeValid                    = 0;                            { Says that this mode should NOT be trimmed. }
  180.     kModeSafe                    = 1;                            { This mode does not need confirmation }
  181.     kModeDefault                = 2;                            { This is the default mode for this type of connection }
  182.     kModeShowNow                = 3;                            { This mode should always be shown (even though it may require a confirm) }
  183.     kModeNotResize                = 4;                            { This mode should not be used to resize the display (eg. mode selects a different connector on card) }
  184.     kModeRequiresPan            = 5;                            { This mode has more pixels than are actually displayed }
  185.     kModeInterlaced                = 6;                            { This mode is interlaced (single pixel lines look bad). }
  186.     kModeShowNever                = 7;                            { This mode should not be shown in the user interface. }
  187.  
  188. { csResolutionFlags bit flags for VDResolutionInfoRec }
  189.     kResolutionHasMultipleDepthSizes = 0;                        { Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) }
  190.  
  191. {    Power Mode constants for VDPowerStateRec.powerState.    }
  192.     kAVPowerOff                    = 0;
  193.     kAVPowerStandby                = 1;
  194.     kAVPowerSuspend                = 2;
  195.     kAVPowerOn                    = 3;
  196.  
  197. {    Power Mode masks and bits for VDPowerStateRec.powerFlags.    }
  198.     kPowerStateNeedsRefresh        = 0;
  199.     kPowerStateNeedsRefreshMask    = 0+(1 * (2**(0)));
  200.  
  201. { Control Codes }
  202.     cscReset                    = 0;
  203.     cscKillIO                    = 1;
  204.     cscSetMode                    = 2;
  205.     cscSetEntries                = 3;
  206.     cscSetGamma                    = 4;
  207.     cscGrayPage                    = 5;
  208.     cscGrayScreen                = 5;
  209.     cscSetGray                    = 6;
  210.     cscSetInterrupt                = 7;
  211.     cscDirectSetEntries            = 8;
  212.     cscSetDefaultMode            = 9;
  213.     cscSwitchMode                = 10;
  214.     cscSetSync                    = 11;
  215.     cscSavePreferredConfiguration = 16;
  216.     cscSetHardwareCursor        = 22;
  217.     cscDrawHardwareCursor        = 23;
  218.     cscSetConvolution            = 24;
  219.     cscSetPowerState            = 25;
  220.     cscUnusedCall                = 127;                            { This call used to expend the scrn resource.  Its imbedded data contains more control info }
  221.  
  222. { Status Codes }
  223.     cscGetMode                    = 2;
  224.     cscGetEntries                = 3;
  225.     cscGetPageCnt                = 4;
  226.     cscGetPages                    = 4;                            { This is what C&D 2 calls it. }
  227.     cscGetPageBase                = 5;
  228.     cscGetBaseAddr                = 5;                            { This is what C&D 2 calls it. }
  229.     cscGetGray                    = 6;
  230.     cscGetInterrupt                = 7;
  231.     cscGetGamma                    = 8;
  232.     cscGetDefaultMode            = 9;
  233.     cscGetCurMode                = 10;
  234.     cscGetSync                    = 11;
  235.     cscGetConnection            = 12;                            { Return information about the connection to the display }
  236.     cscGetModeTiming            = 13;                            { Return timing info for a mode }
  237.     cscGetModeBaseAddress        = 14;                            { Return base address information about a particular mode }
  238.     cscGetScanProc                = 15;                            { QuickTime scan chasing routine }
  239.     cscGetPreferredConfiguration = 16;
  240.     cscGetNextResolution        = 17;
  241.     cscGetVideoParameters        = 18;
  242.     cscGetGammaInfoList            = 20;
  243.     cscRetrieveGammaTable        = 21;
  244.     cscSupportsHardwareCursor    = 22;
  245.     cscGetHardwareCursorDrawState = 23;
  246.     cscGetConvolution            = 24;
  247.     cscGetPowerState            = 25;
  248.  
  249. { Bit definitions for the Get/Set Sync call}
  250.     kDisableHorizontalSyncBit    = 0;
  251.     kDisableVerticalSyncBit        = 1;
  252.     kDisableCompositeSyncBit    = 2;
  253.     kEnableSyncOnBlue            = 3;
  254.     kEnableSyncOnGreen            = 4;
  255.     kEnableSyncOnRed            = 5;
  256.     kNoSeparateSyncControlBit    = 6;
  257.     kTriStateSyncBit            = 7;
  258.     kHorizontalSyncMask            = $01;
  259.     kVerticalSyncMask            = $02;
  260.     kCompositeSyncMask            = $04;
  261.     kDPMSSyncMask                = $07;
  262.     kTriStateSyncMask            = $80;
  263.     kSyncOnBlueMask                = $08;
  264.     kSyncOnGreenMask            = $10;
  265.     kSyncOnRedMask                = $20;
  266.     kSyncOnMask                    = $38;
  267.  
  268. {    Power Mode constants for translating DPMS modes to Get/SetSync calls.    }
  269.     kDPMSSyncOn                    = 0;
  270.     kDPMSSyncStandby            = 1;
  271.     kDPMSSyncSuspend            = 2;
  272.     kDPMSSyncOff                = 7;
  273.  
  274.     kConvolved                    = 0;
  275.     kLiveVideoPassThru            = 1;
  276.     kConvolvedMask                = $01;
  277.     kLiveVideoPassThruMask        = $02;
  278.  
  279.  
  280. TYPE
  281.     VPBlock = RECORD
  282.         vpBaseOffset:            LONGINT;                                {Offset to page zero of video RAM (From minorBaseOS).}
  283.         vpRowBytes:                INTEGER;                                {Width of each row of video memory.}
  284.         vpBounds:                Rect;                                    {BoundsRect for the video display (gives dimensions).}
  285.         vpVersion:                INTEGER;                                {PixelMap version number.}
  286.         vpPackType:                INTEGER;
  287.         vpPackSize:                LONGINT;
  288.         vpHRes:                    LONGINT;                                {Horizontal resolution of the device (pixels per inch).}
  289.         vpVRes:                    LONGINT;                                {Vertical resolution of the device (pixels per inch).}
  290.         vpPixelType:            INTEGER;                                {Defines the pixel type.}
  291.         vpPixelSize:            INTEGER;                                {Number of bits in pixel.}
  292.         vpCmpCount:                INTEGER;                                {Number of components in pixel.}
  293.         vpCmpSize:                INTEGER;                                {Number of bits per component}
  294.         vpPlaneBytes:            LONGINT;                                {Offset from one plane to the next.}
  295.     END;
  296.  
  297.     VPBlockPtr = ^VPBlock;
  298.  
  299.     VDEntryRecord = RECORD
  300.         csTable:                Ptr;                                    {(long) pointer to color table entry=value, r,g,b:INTEGER}
  301.     END;
  302.  
  303.     VDEntRecPtr = ^VDEntryRecord;
  304.  
  305. { Parm block for SetGray control call }
  306.     VDGrayRecord = RECORD
  307.         csMode:                    BOOLEAN;                                {Same as GDDevType value (0=color, 1=mono)}
  308.     END;
  309.  
  310.     VDGrayPtr = ^VDGrayRecord;
  311.  
  312. { Parm block for SetInterrupt call }
  313.     VDFlagRecord = RECORD
  314.         csMode:                    SInt8;
  315.     END;
  316.  
  317.     VDFlagRecPtr = ^VDFlagRecord;
  318.  
  319. { Parm block for SetEntries control call }
  320.     VDSetEntryRecord = RECORD
  321.         csTable:                ^ColorSpec;                                {Pointer to an array of color specs}
  322.         csStart:                INTEGER;                                {Which spec in array to start with, or -1}
  323.         csCount:                INTEGER;                                {Number of color spec entries to set}
  324.     END;
  325.  
  326.     VDSetEntryPtr = ^VDSetEntryRecord;
  327.  
  328. { Parm block for SetGamma control call }
  329.     VDGammaRecord = RECORD
  330.         csGTable:                Ptr;                                    {pointer to gamma table}
  331.     END;
  332.  
  333.     VDGamRecPtr = ^VDGammaRecord;
  334.  
  335.     VDBaseAddressInfoRec = RECORD
  336.         csDevData:                LONGINT;                                { LONGINT - (long) timing mode }
  337.         csDevBase:                LONGINT;                                { LONGINT - (long) base address of the mode }
  338.         csModeReserved:            INTEGER;                                { INTEGER - (short) will some day be the depth }
  339.         csModeBase:                LONGINT;                                { LONGINT - (long) reserved }
  340.     END;
  341.  
  342.     VDBaseAddressInfoPtr = ^VDBaseAddressInfoRec;
  343.  
  344.     VDSwitchInfoRec = RECORD
  345.         csMode:                    INTEGER;                                {(word) mode depth}
  346.         csData:                    LONGINT;                                {(long) functional sResource of mode}
  347.         csPage:                    INTEGER;                                {(word) page to switch in}
  348.         csBaseAddr:                Ptr;                                    {(long) base address of page (return value)}
  349.         csReserved:                LONGINT;                                {(long) Reserved (set to 0) }
  350.     END;
  351.  
  352.     VDSwitchInfoPtr = ^VDSwitchInfoRec;
  353.  
  354.     VDTimingInfoRec = RECORD
  355.         csTimingMode:            LONGINT;                                { LONGINT - (long) timing mode (a la InitGDevice) }
  356.         csTimingReserved:        LONGINT;                                { LONGINT - (long) reserved }
  357.         csTimingFormat:            LONGINT;                                { LONGINT - (long) what format is the timing info }
  358.         csTimingData:            LONGINT;                                { LONGINT - (long) data supplied by driver }
  359.         csTimingFlags:            LONGINT;                                { LONGINT - (long) mode within device }
  360.     END;
  361.  
  362.     VDTimingInfoPtr = ^VDTimingInfoRec;
  363.  
  364.     VDDisplayConnectInfoRec = RECORD
  365.         csDisplayType:            INTEGER;                                { INTEGER - (word) Type of display connected }
  366.         csConnectTaggedType:    SInt8; (* unsigned char *)                { BYTE - type of tagging }
  367.         csConnectTaggedData:    SInt8; (* unsigned char *)                { BYTE - tagging data }
  368.         csConnectFlags:            LONGINT;                                { LONGINT - (long) tell us about the connection }
  369.         csDisplayComponent:        LONGINT;                                { LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) }
  370.         csConnectReserved:        LONGINT;                                { LONGINT - (long) reserved }
  371.     END;
  372.  
  373.     VDDisplayConnectInfoPtr = ^VDDisplayConnectInfoRec;
  374.  
  375. { RawSenseCode
  376.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  377.     for the possible raw sense code values when 'standard' sense code hardware is implemented.
  378.  
  379.     For 'standard' sense code hardware, the raw sense is obtained as follows:
  380.         • Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  381.         • Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  382.  
  383.     IMPORTANT Note: 
  384.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  385.     are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  386.  
  387. }
  388.     RawSenseCode = CHAR;
  389.  
  390.  
  391. CONST
  392.     kRSCZero                    = 0;
  393.     kRSCOne                        = 1;
  394.     kRSCTwo                        = 2;
  395.     kRSCThree                    = 3;
  396.     kRSCFour                    = 4;
  397.     kRSCFive                    = 5;
  398.     kRSCSix                        = 6;
  399.     kRSCSeven                    = 7;
  400.  
  401. { ExtendedSenseCode
  402.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  403.     for the values which are possible when the extended sense algorithm is applied to hardware
  404.     which implements 'standard' sense code hardware.
  405.  
  406.      For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  407.     (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  408.         • Drive sense line 'A' low and read the values of 'B' and 'C'.  
  409.         • Drive sense line 'B' low and read the values of 'A' and 'C'.
  410.         • Drive sense line 'C' low and read the values of 'A' and 'B'.
  411.  
  412.     In this way, a six-bit number of the form BC/AC/AB is generated. 
  413.  
  414.     IMPORTANT Note: 
  415.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  416.     are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  417.  
  418. }
  419.     
  420. TYPE
  421.     ExtendedSenseCode = CHAR;
  422.  
  423.  
  424. CONST
  425.     kESCZero21Inch                = $00;                            { 21" RGB                                 }
  426.     kESCOnePortraitMono            = $14;                            { Portrait Monochrome                     }
  427.     kESCTwo12Inch                = $21;                            { 12" RGB                                }
  428.     kESCThree21InchRadius        = $31;                            { 21" RGB (Radius)                        }
  429.     kESCThree21InchMonoRadius    = $34;                            { 21" Monochrome (Radius)                 }
  430.     kESCThree21InchMono            = $35;                            { 21" Monochrome                        }
  431.     kESCFourNTSC                = $0A;                            { NTSC                                 }
  432.     kESCFivePortrait            = $1E;                            { Portrait RGB                         }
  433.     kESCSixMSB1                    = $03;                            { MultiScan Band-1 (12" thru 1Six")    }
  434.     kESCSixMSB2                    = $0B;                            { MultiScan Band-2 (13" thru 19")        }
  435.     kESCSixMSB3                    = $23;                            { MultiScan Band-3 (13" thru 21")        }
  436.     kESCSixStandard                = $2B;                            { 13"/14" RGB or 12" Monochrome        }
  437.     kESCSevenPAL                = $00;                            { PAL                                    }
  438.     kESCSevenNTSC                = $14;                            { NTSC                                 }
  439.     kESCSevenVGA                = $17;                            { VGA                                     }
  440.     kESCSeven16Inch                = $2D;                            { 16" RGB (GoldFish)                      }
  441.     kESCSevenPALAlternate        = $30;                            { PAL (Alternate)                         }
  442.     kESCSeven19Inch                = $3A;                            { Third-Party 19”                        }
  443.     kESCSevenNoDisplay            = $3F;                            { No display connected                 }
  444.  
  445. { DepthMode
  446.     This abstract data type is used to to reference RELATIVE pixel depths.
  447.     Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  448.  
  449.     Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  450.     graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  451.     hardware, 'kDepthMode1' may represent 8BPP.
  452.  
  453.     DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  454.     behave as expected.  The values of the constants which comprise the set are such
  455.     that 'kDepthMode4 < kDepthMode6' behaves as expected.
  456. }
  457.     
  458. TYPE
  459.     DepthMode = INTEGER;
  460.  
  461.  
  462. CONST
  463.     kDepthMode1                    = 128;
  464.     kDepthMode2                    = 129;
  465.     kDepthMode3                    = 130;
  466.     kDepthMode4                    = 131;
  467.     kDepthMode5                    = 132;
  468.     kDepthMode6                    = 133;
  469.  
  470.     kFirstDepthMode                = 128;                            { These constants are obsolete, and just included    }
  471.     kSecondDepthMode            = 129;                            { for clients that have converted to the above        }
  472.     kThirdDepthMode                = 130;                            { kDepthModeXXX constants.                            }
  473.     kFourthDepthMode            = 131;
  474.     kFifthDepthMode                = 132;
  475.     kSixthDepthMode                = 133;
  476.  
  477.  
  478. TYPE
  479.     VDPageInfo = RECORD
  480.         csMode:                    INTEGER;                                {(word) mode within device}
  481.         csData:                    LONGINT;                                {(long) data supplied by driver}
  482.         csPage:                    INTEGER;                                {(word) page to switch in}
  483.         csBaseAddr:                Ptr;                                    {(long) base address of page}
  484.     END;
  485.  
  486.     VDPgInfoPtr = ^VDPageInfo;
  487.  
  488.     VDSizeInfo = RECORD
  489.         csHSize:                INTEGER;                                {(word) desired/returned h size}
  490.         csHPos:                    INTEGER;                                {(word) desired/returned h position}
  491.         csVSize:                INTEGER;                                {(word) desired/returned v size}
  492.         csVPos:                    INTEGER;                                {(word) desired/returned v position}
  493.     END;
  494.  
  495.     VDSzInfoPtr = ^VDSizeInfo;
  496.  
  497.     VDSettings = RECORD
  498.         csParamCnt:                INTEGER;                                {(word) number of params}
  499.         csBrightMax:            INTEGER;                                {(word) max brightness}
  500.         csBrightDef:            INTEGER;                                {(word) default brightness}
  501.         csBrightVal:            INTEGER;                                {(word) current brightness}
  502.         csCntrstMax:            INTEGER;                                {(word) max contrast}
  503.         csCntrstDef:            INTEGER;                                {(word) default contrast}
  504.         csCntrstVal:            INTEGER;                                {(word) current contrast}
  505.         csTintMax:                INTEGER;                                {(word) max tint}
  506.         csTintDef:                INTEGER;                                {(word) default tint}
  507.         csTintVal:                INTEGER;                                {(word) current tint}
  508.         csHueMax:                INTEGER;                                {(word) max hue}
  509.         csHueDef:                INTEGER;                                {(word) default hue}
  510.         csHueVal:                INTEGER;                                {(word) current hue}
  511.         csHorizDef:                INTEGER;                                {(word) default horizontal}
  512.         csHorizVal:                INTEGER;                                {(word) current horizontal}
  513.         csHorizMax:                INTEGER;                                {(word) max horizontal}
  514.         csVertDef:                INTEGER;                                {(word) default vertical}
  515.         csVertVal:                INTEGER;                                {(word) current vertical}
  516.         csVertMax:                INTEGER;                                {(word) max vertical}
  517.     END;
  518.  
  519.     VDSettingsPtr = ^VDSettings;
  520.  
  521.     VDDefMode = RECORD
  522.         csID:                    SInt8; (* UInt8 *)
  523.     END;
  524.  
  525.     VDDefModePtr = ^VDDefMode;
  526.  
  527.     VDSyncInfoRec = RECORD
  528.         csMode:                    SInt8; (* UInt8 *)
  529.         csFlags:                SInt8; (* UInt8 *)
  530.     END;
  531.  
  532.     VDSyncInfoPtr = ^VDSyncInfoRec;
  533.  
  534.     DisplayModeID = LONGINT;
  535.  
  536.     VideoDeviceType = LONGINT;
  537.  
  538.     GammaTableID = LONGINT;
  539.  
  540. { Constants for the GetNextResolution call }
  541.  
  542. CONST
  543.     kDisplayModeIDCurrent        = $0;                            { Reference the Current DisplayModeID }
  544.     kDisplayModeIDInvalid        = $ffffffff;                    { A bogus DisplayModeID in all cases }
  545.     kDisplayModeIDFindFirstResolution = $fffffffe;                { Used in cscGetNextResolution to reset iterator }
  546.     kDisplayModeIDNoMoreResolutions = $fffffffd;                { Used in cscGetNextResolution to indicate End Of List }
  547.  
  548. { Constants for the GetGammaInfoList call }
  549.     kGammaTableIDFindFirst        = $fffffffe;                    { Get the first gamma table ID }
  550.     kGammaTableIDNoMoreTables    = $fffffffd;                    { Used to indicate end of list }
  551.     kGammaTableIDSpecific        = $0;                            { Return the info for the given table id }
  552.  
  553.  
  554. TYPE
  555.     VDResolutionInfoRec = RECORD
  556.         csPreviousDisplayModeID: DisplayModeID;                            { ID of the previous resolution in a chain }
  557.         csDisplayModeID:        DisplayModeID;                            { ID of the next resolution }
  558.         csHorizontalPixels:        LONGINT;                                { # of pixels in a horizontal line at the max depth }
  559.         csVerticalLines:        LONGINT;                                { # of lines in a screen at the max depth }
  560.         csRefreshRate:            Fixed;                                    { Vertical Refresh Rate in Hz }
  561.         csMaxDepthMode:            DepthMode;                                { 0x80-based number representing max bit depth }
  562.         csResolutionFlags:        LONGINT;                                { Reserved - flag bits }
  563.         csReserved:                LONGINT;                                { Reserved }
  564.     END;
  565.  
  566.     VDResolutionInfoPtr = ^VDResolutionInfoRec;
  567.  
  568.     VDVideoParametersInfoRec = RECORD
  569.         csDisplayModeID:        DisplayModeID;                            { the ID of the resolution we want info on }
  570.         csDepthMode:            DepthMode;                                { The bit depth we want the info on (0x80 based) }
  571.         csVPBlockPtr:            VPBlockPtr;                                { Pointer to a video parameter block }
  572.         csPageCount:            LONGINT;                                { Number of pages supported by the resolution }
  573.         csDeviceType:            VideoDeviceType;                        { Device Type:  Direct, Fixed or CLUT; }
  574.         csReserved:                LONGINT;                                { Reserved }
  575.     END;
  576.  
  577.     VDVideoParametersInfoPtr = ^VDVideoParametersInfoRec;
  578.  
  579.     VDGammaInfoRec = RECORD
  580.         csLastGammaID:            GammaTableID;                            { the ID of the previous gamma table }
  581.         csNextGammaID:            GammaTableID;                            { the ID of the next gamma table }
  582.         csGammaPtr:                Ptr;                                    { Ptr to a gamma table data }
  583.         csReserved:                LONGINT;                                { Reserved }
  584.     END;
  585.  
  586.     VDGammaInfoPtr = ^VDGammaInfoRec;
  587.  
  588.     VDGetGammaListRec = RECORD
  589.         csPreviousGammaTableID:    GammaTableID;                            { ID of the previous gamma table }
  590.         csGammaTableID:            GammaTableID;                            { ID of the gamma table following csPreviousDisplayModeID }
  591.         csGammaTableSize:        LONGINT;                                { Size of the gamma table in bytes }
  592.         csGammaTableName:        ^CHAR;                                    { Gamma table name (c-string) }
  593.     END;
  594.  
  595.     VDGetGammaListPtr = ^VDGetGammaListRec;
  596.  
  597.     VDRetrieveGammaRec = RECORD
  598.         csGammaTableID:            GammaTableID;                            { ID of gamma table to retrieve }
  599.         csGammaTablePtr:        ^GammaTbl;                                { Location to copy desired gamma to }
  600.     END;
  601.  
  602.     VDRetrieveGammaPtr = ^VDRetrieveGammaRec;
  603.  
  604.     VDSetHardwareCursorRec = RECORD
  605.         csCursorRef:            Ptr;                                    { reference to cursor data }
  606.         csReserved1:            UInt32;                                    { reserved for future use }
  607.         csReserved2:            UInt32;                                    { should be ignored }
  608.     END;
  609.  
  610.     VDSetHardwareCursorPtr = ^VDSetHardwareCursorRec;
  611.  
  612.     VDDrawHardwareCursorRec = RECORD
  613.         csCursorX:                SInt32;                                    { x coordinate }
  614.         csCursorY:                SInt32;                                    { y coordinate }
  615.         csCursorVisible:        UInt32;                                    { true if cursor is must be visible }
  616.         csReserved1:            UInt32;                                    { reserved for future use }
  617.         csReserved2:            UInt32;                                    { should be ignored }
  618.     END;
  619.  
  620.     VDDrawHardwareCursorPtr = ^VDDrawHardwareCursorRec;
  621.  
  622.     VDSupportsHardwareCursorRec = RECORD
  623.         csSupportsHardwareCursor: UInt32;
  624.         { true if hardware cursor is supported }
  625.         csReserved1:            UInt32;                                    { reserved for future use }
  626.         csReserved2:            UInt32;                                    { must be zero }
  627.     END;
  628.  
  629.     VDSupportsHardwareCursorPtr = ^VDSupportsHardwareCursorRec;
  630.  
  631.     VDHardwareCursorDrawStateRec = RECORD
  632.         csCursorX:                SInt32;                                    { x coordinate }
  633.         csCursorY:                SInt32;                                    { y coordinate }
  634.         csCursorVisible:        UInt32;                                    { true if cursor is visible }
  635.         csCursorSet:            UInt32;                                    { true if cursor successfully set by last set control call }
  636.         csReserved1:            UInt32;                                    { reserved for future use }
  637.         csReserved2:            UInt32;                                    { must be zero }
  638.     END;
  639.  
  640.     VDHardwareCursorDrawStatePtr = ^VDHardwareCursorDrawStateRec;
  641.  
  642.     VDConvolutionInfoRec = RECORD
  643.         csDisplayModeID:        DisplayModeID;                            { the ID of the resolution we want info on }
  644.         csDepthMode:            DepthMode;                                { The bit depth we want the info on (0x80 based) }
  645.         csPage:                    LONGINT;
  646.         csFlags:                UInt32;
  647.         csReserved:                UInt32;
  648.     END;
  649.  
  650.     VDConvolutionInfoPtr = ^VDConvolutionInfoRec;
  651.  
  652.     VDPowerStateRec = RECORD
  653.         powerState:                LONGINT;
  654.         powerFlags:                LONGINT;
  655.         powerReserved1:            LONGINT;
  656.         powerReserved2:            LONGINT;
  657.     END;
  658.  
  659.     VDPowerStatePtr = ^VDPowerStateRec;
  660.  
  661.  
  662. {$ALIGN RESET}
  663. {$POP}
  664.  
  665. {$SETC UsingIncludes := VideoIncludes}
  666.  
  667. {$ENDC} {__VIDEO__}
  668.  
  669. {$IFC NOT UsingIncludes}
  670.  END.
  671. {$ENDC}
  672.